//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.smartstate.dataManagement.vo;

public enum ResultCode implements BaseResultCode {
    PARAMETER_ERROR(1, "请求参数异常"),
    RESOURCE_EXISTS(2, "资源已存在"),
    RESOURCE_NOT_EXISTS(3, "操作资源不存在"),
    RESOURCE_SAVE_ERROR(4, "数据保存异常"),
    RESPONSE_TIMEOUT(5, "响应超时异常"),
    PERMISSION_DENIED(6, "权限不足异常"),
    OPERATION_INVALID(7, "操作无效"),
    NOT_BLANK(8, "参数不能为空"),
    COMMON_FAIL(9, "业务异常"),
    USERNAME_ERROR(10, "用户名或密码错误"),
    HYSTRIX_ERROR(11, "调用xxx服务{}方法失败!"),
    PASSWORD_ERROR(12, "密码错误"),
    VERIFICATION_FAIL(13, "数据校验失败"),
    REDIS_ERROR(14, "redis 数据异常"),
    LOGIN_ERROR(15, "登录失败"),
    Runtime_Exception(5848, "代码运行异常"),
    UNKNOWN(99, "未知错误"),
    SUCCESS(200, "成功"),
    NOT_FOUND(404, "未找到 "),
    INVALID_TOKEN(401, "身份认证失败"),
    UNAUTHORIZED(403, "权限不足"),
    SERVER_ERROR(500, "服务器异常"),
    CLIENT_ERROR(402, "该client_id不存在！"),
    SERVER_TIMEOUT(504, "请求超时，请稍后再试！"),
    SSSPROXY_ERROR(2500, ""),
    DATA_DUPLICATION(408,"数据已存在");

    private Integer code;
    private String message;

    public Integer getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }

    private ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static ResultCode getEnum(int code) {
        ResultCode[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            ResultCode ele = var1[var3];
            if (ele.getCode() == code) {
                return ele;
            }
        }

        return null;
    }

    public static int getCode(int errorPreFixCode, int code) {
        return errorPreFixCode * 100 + code;
    }
}
